import java.util.Timer;

public class Test {
    public static void main(String[] args) {
        String s = "hello";
        StringBuilder s1 = new StringBuilder("hello");
        Long time1=System.currentTimeMillis();
        //记录当前时间
        for (int i = 0; i <10000 ; i++) {
            s+="i";
        }
        Long time2=System.currentTimeMillis();
        for (int i = 0; i < 10000; i++) {
            s1.append("i");
        }
        Long time3=System.currentTimeMillis();
        System.out.println(time2-time1);
        System.out.println(time3-time2);
    }
}